<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  
  <body>
  <div style="width:1200px; margin:0 auto;">
  	<div style="width:1200px; height:80px; background-image:url(image/tou.jpg)"></div>
    <div style="height:600px; width:1200px;">
        <div style="width:300px; height:600px; float:left;">
            <div style="background-image:url(image/denglu.jpg); height:60px; text-align: center; font-weight: bold; font-size: 36px;"><div style="height:10px;"></div>
            <a href="index.jsp">登录</a></div>
            <div style="background-image:url(image/zhuce.jpg); height:60px; text-align: center; font-weight: bold; font-size: 36px;"><div style="height:10px;"></div>
            <a href="register.jsp">注册</a></div>
            <div style="background-image:url(image/denglu.jpg); height:60px; text-align: center; font-weight: bold; font-size: 36px;"><div style="height:10px;"></div>
            <a href="list">购物</a></div>
            <div style="background-image:url(image/zhuce.jpg); height:60px; text-align: center; font-weight: bold; font-size: 36px;"><div style="height:10px;"></div>
            <a href="update.jsp">添加商品信息</a></div>
        </div>
        <div style="width:880px; height:600px; float:left; margin-left:20px;">
            <div style="height:20px; width:880px;"></div>
            <c:forEach items="${productlist}" var="item">
			  <tr >
			    <td>商品名：${item.name}</td>
			    <td>价格：${item.price}</td>
			    <td><a href="shop?productid=${item.id}">购买</a></td>
			  </tr>
			</c:forEach> 
        </div>
    </div>
    <div style="width:1200px; height:80px; background-image:url(image/jiao.jpg)"></div>
  </div>
</body>
</html>
